import request from '@/utils/request'

export default {
  // /oaGuiZhang/add
  // 新增
  // {
  //   "created": "2020-06-16T08:05:52.926Z",
  //   "infoContent": "string",
  //   "infoTitle": "string"
  // }
  save(data) {
    return request({
      url: `/oaGuiZhang/add`,
      method: 'post',
      data
    })
  },
  // /api/oaGuiZhang/index
  // 分页查询
  list(page,title) {
    return request({
      url: `/oaGuiZhang/index`,
      method: 'get',
      params: { pageIndex: page.index, pageSize: page.size,title }
    })
  },
  // /oaGuiZhang/deleteByIds
  // 根据id批量删除列表
  delete(data){
    return request({
      url: `/oaGuiZhang/deleteByIds`,
      method: 'delete',
      data
    })
  },
  // /oaGuiZhang/edit/{id}
  // 修改
  // {
  //   "created": "2020-06-16T08:03:39.987Z",
  //   "infoContent": "string",
  //   "infoTitle": "string"
  // }
  update(data){
    return request({
      url: `/oaGuiZhang/edit/${data.infoId}`,
      method: 'post',
      data
    })
  },
  // /oaGuiZhang/getInfoById/{id}
  // 根据id查
  getById(id){
    return request({
      url: `/oaGuiZhang/getInfoById/${id}`,
      method: 'get'
    })
  }

}
